#pragma once
#include"coin.h"

class PlayGrid
{
//metodi pubblici
public:
	PlayGrid(void){}
	~PlayGrid(void){ResetData();}

	bool Init(GLfloat base_col, GLfloat base_row, GLfloat dist, Color_t col);
	void BuildList();
    void Draw();
    void ResetData();
	void InsertCoin(short col);
    void MoveCoin(Versus_t v); 
	void CheckEndGame(Color_t c);  
	Color_t GetCurColor()	   {return m_cCurColor;}
	short GetCurIndex()		   {return m_sCurIndex;}
	bool  GetReady()		   {return m_bReady;}
	bool  GetEnd()			   {return m_bEnd;}
	void  SetCurIndex(int col) {m_sCurIndex = col;}			
  //metodi privati
private:
	

//attributi
private:
	GLUquadricObj *m_pQuadratic;	// Spazio per gli oggetti quadratici 
	GLuint m_oDrawGrid;
    GLfloat m_fDist;
	GLfloat m_fColPos[N_COL + 1];
    GLfloat m_fRowPos[N_ROW + 2];
	bool  m_bEnd;
	bool  m_bReady;
	short m_sNcoins;
	short m_sCurIndex;
	short m_sStep;
	Coin *m_pCoinGrid[N_ROW][N_COL];
	Coin *m_pActCoin;
	Color_t  m_cCurColor;

};
